<?php

class NewsletterView extends Newsletter{

	public function listar($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){
			echo '<tr>';
				echo '<td width="30%">',$arr[$i]['nome'],'</td>';
                echo '<td width="30%">',$arr[$i]['email'],'</td>';
				echo '<td width="20%" align="center" onclick="javascript:editar(',$arr[$i]['idnewsletter'],',\'newsletter\');" class="tabelaB"><img src="images/app-edit-icon.png" width="20" align="absmiddle" /> Editar</td>';
				echo '<td width="20%" id="editar" align="center" onclick="javascript:excluir(',$arr[$i]['idnewsletter'],',\'newsletter\');" class="tabelaB"><img src="images/app-delete-icon.png" width="20" align="absmiddle" /> Excluir</td>';
			echo '</tr>';
	    }
	}
	public function visualizar($arr){
		$total = count($arr);
		for($i = 0;$i < $total;$i++){

		}
	}
	public function select($arr){
		$total = count($arr);
		echo '<option value = "0">Selecione</option>';
		for($i = 0;$i < $total;$i++){
			echo '<option value="',$arr[$i]['idnewsletter'],'">',$arr[$i]['nome'],'</option>';
		}
	}

}
?>